<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <button id="cn">中文</button>
  <button id="en">英文</button>
  <script type="module">
    import { set, get,remove} from './cookie.js'
    /* set('name', 'aa')
    // set('sex','male',{maxAge:30*24*3600})
    set('age', '18', { maxAge: 30000 })
    remove('age')
    console.log(get('age'));
     */
    const cnBTn=document.getElementById('cn')
    const enBtn=document.getElementById('en')
    cnBTn.onclick=function(){
      set('language','cn',{maxAge:30*24})
    }
    enBTn.onclick=function(){
      set('language','en',{maxAge:30*24})
    }
  </script>
</body>

</html>